package ScannerDemo;

import java.util.Scanner;

public class ScannerDemo2 {
    public static void main(String[] args) {

        //创建键盘录入对象
        Scanner s = new Scanner(System.in);
        //提示性输入
        System.out.println("输入是否高");
        boolean gao = s.nextBoolean();
        //提示性输入
        System.out.println("输入是否帅");
        boolean shuai = s.nextBoolean();
        //提示性输入
        System.out.println("输入是否富");
        boolean fu = s.nextBoolean();

        //三元运算符
        System.out.println("是否为高富帅："+ (gao && fu && shuai?"是":"否"));
    }
}
